package com.hz.house.enums;

/**
 * <p> 价格查询条件枚举
 * @author lfw
 *
 */
public enum SearchTotalPriceConditionEnum {
	NOT_LIMIT("不限",-1,0,0),
	LESS_1OOW("100万以内",1,0,1000000),
	LESS_150W("100-150万",2,1000000,1500000),
	LESS_200W("150-200万",3,1500000,2000000),
	LESS_250W("200-250万",4,2000000,2500000),
	LESS_300W("250-300万",5,2500000,3000000),
	MORE_300W("300万以上",6,3000000,100000000);

	private String  name;
	
	private int id;//该标签的id
	
	private int min;//总价最小
	
	private int max;//总价最大
	
	
	SearchTotalPriceConditionEnum(String name,int id,int min,int max) {
		this.name=name;
		this.id=id;
		this.min=min;
		this.max=max;
	}

	/**
	 * <p> 根据id获取枚举实体
	 * @param id
	 * @return
	 */
	public static SearchTotalPriceConditionEnum getSearchTotalPriceConditionById(int id) {
		SearchTotalPriceConditionEnum[] all = SearchTotalPriceConditionEnum.values();
		for(SearchTotalPriceConditionEnum c:all) {
			if(c.getId()==id)
				return c;
		}
		return null;
	}

	public String getName() {
		return name;
	}


	public int getId() {
		return id;
	}


	public int getMin() {
		return min;
	}


	public int getMax() {
		return max;
	}
	
}
